from tortoise.contrib.fastapi import register_tortoise
from uvicorn import run

from api import app

register_tortoise(app,
                  db_url="sqlite://signal_management_system.db",
                  modules={"models": ["models"]},
                  generate_schemas=True,
                  add_exception_handlers=True
                  )

if __name__ == '__main__':
    run("main:app", debug=True, reload=True)
